package com.example.service.impl.institutioncare.peoplemanagement;

import com.example.bean.institutioncare.peoplemanagement.*;
import com.example.mapper.institutioncare.peoplemanagement.PeoplemanagementMapper;
import com.example.service.institutioncare.peoplemanagement.PeoplemanagementService;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class PeoplemanagementImp implements PeoplemanagementService {
    @Autowired
    PeoplemanagementMapper peoplemanagementMapper;


    @Override
    public PageInfo<Peoplemanagement> peoplemanagementPageInfo(PeoplemanagementDuoTiaoJian peoplemanagementDuoTiaoJian) {
        System.out.println("查询时接受的值："+peoplemanagementDuoTiaoJian);
        int dangqianye = peoplemanagementDuoTiaoJian.getCurrentpage()==0?1:peoplemanagementDuoTiaoJian.getCurrentpage();
        int meiyetiaoshu = peoplemanagementDuoTiaoJian.getPagesize()==0?5:peoplemanagementDuoTiaoJian.getPagesize();
        PageHelper.startPage(dangqianye,meiyetiaoshu);
        PageInfo<Peoplemanagement> heihei = new PageInfo<>(peoplemanagementMapper.peoplemanagementList(peoplemanagementDuoTiaoJian));
        System.out.println("查询到的值："+heihei);
        return heihei;
    }

    @Override
    public int haoba(RuZhuGuanLiNum ruZhuGuanLiNum) {

        return peoplemanagementMapper.haoba(ruZhuGuanLiNum);
    }

    @Override
    public RuZhuGuanLiNum ruzhuguanliBean(String noid) {
        return peoplemanagementMapper.ruzhuguanliBean(noid);
    }

    @Override
    public int xiugai(RuZhuGuanLiNum ruZhuGuanLiNum) {
        return peoplemanagementMapper.xiugai(ruZhuGuanLiNum);
    }

    @Override
    public int shanchu(List<String> list) {
        return peoplemanagementMapper.shanchu(list);
    }

    @Override
    public int zhuxiao(ZhuXiao zhuXiao) {
        return peoplemanagementMapper.zhuxiao(zhuXiao);
    }

    @Override
    public List<LiangGeCanShu> xialaList() {
        return peoplemanagementMapper.xialaList();
    }

    @Override
    public BingZhuangTu bingzhuangtu() {
        return peoplemanagementMapper.bingzhuangtu();
    }

    @Override
    public ZhuZhuangTu zhuzhuangtu() {
        return peoplemanagementMapper.zhuzhuangtu();
    }
}
